<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="<?php echo __PUBLIC__?>/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="<?php echo __PUBLIC__?>/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="<?php echo __PUBLIC__?>/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="<?php echo __PUBLIC__?>/Admin/Flat/img/favicon.ico">
	</head>
	<body>
		<form action="" method="post">
		<div class="alert alert-success">修改分类</div>
		<div class="form-group">
			<label for="exampleInputEmail1">分类名称</label>
			<input value="<?php echo $oldData['cname']?>" id="exampleInputEmail1" class="form-control" type="text" placeholder="" name="cname" required="">
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">所属分类</label>
			<select name="pid" class="form-control">
				<option value="0">顶级分类</option>
				<?php foreach ($cateData as $cate_v){?>
				<option value="<?php echo $cate_v['cid']?>" <?php if($cate_v['cid']==$oldData['pid']){?>
                 selected="" 
               <?php }?>><?php echo $cate_v['_name']?></option>
				<?php }?>
			</select>
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">所属类型</label>
			<select name="type_tid" class="form-control">
				<option value="">请选择</option>
				<?php foreach ($typeData as $v){?>
				<option value="<?php echo $v['tid']?>" <?php if($v['tid']==$oldData['type_tid']){?>
                 selected=""
               <?php }?>><?php echo $v['tname']?></option>
				<?php }?>
			</select>
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">分类排序</label>
			<input value="<?php echo $oldData['sort']?>" id="exampleInputEmail1" class="form-control" type="text" placeholder="" name="sort" required="">
		</div>
		<button class="btn btn-primary btn-block" type="submit"> 确定 </button>
		</form>
	</body>
</html>
